angular.module('mamApp').controller('adjustAlbumPlanModalController', ['$scope', '$uibModalInstance', 'PlayControlManager', 'param','$filter',
    function ($scope, $uibModalInstance, PlayControlManager, param,$filter) {
        $scope.data = {};

        var ids = param.ids;



        PlayControlManager.albumPlanSimpleList().then(function (result) {
            console.log(result)
            if(result.data.c=="s"){
                $scope.planList=result.data.pageList;

            }
        })




        $scope.modelOk = function () {
            var tmp={albumId:ids.join(","),newPlan:$scope.data.newPlan,explain:$scope.data.explain}

            PlayControlManager.adjustAlbumPlayPlan(tmp).then(function (result) {
                if (result.data.c == "s") {
                    $uibModalInstance.close("ok");

                } else {
                    $uibModalInstance.close("error");

                }

            })


        };

        $scope.modelCancel = function () {
            $uibModalInstance.close("cancel");
        };


    }])

